package com.pmsystem.dao;

import com.pmsystem.pojo.CleanMis;
import com.pmsystem.pojo.CleanMisExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;


public interface CleanMisMapper {
    long countByExample(CleanMisExample example);

    int deleteByExample(CleanMisExample example);

    int deleteByPrimaryKey(Integer cleanMisId);

    int insert(CleanMis record);

    int insertSelective(CleanMis record);

    List<CleanMis> selectByExample(CleanMisExample example);

    CleanMis selectByPrimaryKey(Integer cleanMisId);

    int updateByExampleSelective(@Param("record") CleanMis record, @Param("example") CleanMisExample example);

    int updateByExample(@Param("record") CleanMis record, @Param("example") CleanMisExample example);

    int updateByPrimaryKeySelective(CleanMis record);

    int updateByPrimaryKey(CleanMis record);

  
	void deleteCleanMisByAreaId(Integer id);

	/**  
	 * <p>Title: selectAllMisCount</p >  
	 * <p>Description: 查询保洁任务数据条数</p >  
	 * @author 魏家洛
	 * @return  
	 */  
	int selectMisCount(@Param("condition")String condition,@Param("startTime")String startTime,@Param("endTime")String endTime);

	/**  
	 * <p>Title: selectMisPage</p >  
	 * <p>Description: 查询对应分页保洁任务数据</p >  
	 * @author 魏家洛
	 * @param start
	 * @param pageSize
	 * @return  
	 */  
	List<Map<String, Object>> selectMisPage(@Param("start") int start, @Param("pageSize") Integer pageSize,
			@Param("condition")String condition,@Param("startTime")String startTime,@Param("endTime")String endTime);
	/**  
	 * <p>Title: deleteMisById</p >  
	 * <p>Description: 删除id对应保洁任务数据</p >  
	 * @author 魏家洛
	 * @param id
	 * @return  
	 */  
	int deleteMisById(Integer id);

	/**  
	 * <p>Title: selectMisById</p >  
	 * <p>Description:查询id对应保洁任务 </p >  
	 * @author 魏家洛
	 * @param id
	 * @return  
	 */  
	CleanMis selectMisById(Integer id);

	/**  
	 * <p>Title: updateMisByMis</p >  
	 * <p>Description:更新保洁任务数据 </p >  
	 * @author 魏家洛
	 * @param cleanMis
	 * @return  
	 */  
	int updateMisByMis(CleanMis cleanMis);

	/**  
	 * <p>Title: addMis</p >  
	 * <p>Description: 添加保洁任务数据</p >  
	 * @author 魏家洛
	 * @param cleanMis
	 * @return  
	 */  
	int addMis(CleanMis cleanMis);
	/**
	 * <p>Title: selectIsFinishCount</p >  
	 * <p>Description:</p >  
	 * @author 魏家洛
	 * @return
	 */
	int selectIsFinishCount();

	/**  
	 * <p>Title: getProgress</p >  
	 * <p>Description: 获取当天任务进度</p >  
	 * @author 魏家洛
	 * @param currentDate
	 * @return  
	 */  
	Float getProgress(@Param("currentDate")String currentDate);

	/**  
	 * <p>Title: findAllMis</p >  
	 * <p>Description:查找符合条件的所有保洁任务数据</p >  
	 * @author 魏家洛
	 * @param condition
	 * @param startTime
	 * @param endTime
	 * @return  
	 */  
	List<Map<String, Object>> findAllMis(@Param("condition")String condition,@Param("startTime")String startTime,@Param("endTime")String endTime);
	/**  
	 * <p>Title: beFinish</p >  
	 * <p>Description:将任务标记为已完成</p >  
	 * @author 魏家洛
	 * @param id
	 * @return  
	 */  
	int beFinish(Integer id);
}